根据 user 对象的 id 查询该用户下的已创建的 coupon 对象列表。
| 请求参数 | 描述 |
|---|---|
| APP_ID required string | 对应 app 对象的 id,该参数仅需要填写在请求地址内,查看 如何获取App ID。 |
| USER_ID required string | user 对象的 id,该参数仅需要填写在请求地址内。 |
| amount optional int | 订单的原始金额,单位为分。传入该值可以在返回值 actual_amount 得到订单使用优惠券之后的金额。 |
| redeemed optional boolean | 优惠券是否已使用(核销)。 |
| expired optional boolean | 优惠券是否已过期。 |
| page optional int | 页码,默认值为 "1",取值范围:1-100000000。 |
| per_page optional int | 每页数量,默认值为 "10", |
| created[gt] optional int | 创建时间大于该值,用 Unix 时间戳表示。 |
| created[gte] optional int | 创建时间大于或等于该值,用 Unix 时间戳表示。 |
| created[lt] optional int | 创建时间小于该值,用 Unix 时间戳表示。 |
| created[lte] optional int | 创建时间小于或等于该值,用 Unix 时间戳表示。 |
返回
返回一个 coupon 对象列表,或者返回一个错误,详见 错误。
GET https://api.pingxx.com/v1/apps/{APP_ID}/users/{USER_ID}/coupons待补充
待补充
待补充
待补充
待补充
待补充
待补充
curl https://api.pingxx.com/v1/apps/{APP_ID}/users/{USER_ID}/coupons \
-H "Pingplusplus-Request-Timestamp: 1475029155" \
-H "Pingplusplus-Signature: SIGNATURE" \
-u sk_test_ibbTe5jLGCi5rzfH4OqPW9KC:待补充
待补充
待补充
待补充
待补充
待补充
待补充
{
"object": "list",
"url": "/v1/apps/APP_ID/users/USER_ID/coupons",
"has_more": true,
"data": [
{
"id": "300418051415375100031000",
"object": "coupon",
"app": "APP_ID",
"actual_amount": 0,
"coupon_template": {
"id": "300218051415370500016000",
"object": "coupon_template",
"app": "APP_ID",
"amount_available": 0,
"amount_off": null,
"created": 1526283425,
"expiration": {
"time_start": null,
"time_end": null,
"duration": null
},
"livemode": true,
"max_circulation": null,
"max_user_circulation": 100,
"metadata": {
"custom_key": "custom_value"
},
"name": "9 折券 - 最高减 10 元",
"percent_off": 10,
"times_circulated": 2,
"times_redeemed": 0,
"type": 2,
"refundable": true
},
"created": 1526283471,
"livemode": true,
"metadata": {},
"order": null,
"redeemed": false,
"time_end": null,
"time_start": null,
"user": "USER_ID",
"valid": true,
"user_times_circulated": 1
},
{
"id": "300418051415332500033701",
"object": "coupon",
"app": "APP_ID",
"actual_amount": 0,
"coupon_template": {
"id": "300218051009364200014001",
"object": "coupon_template",
"app": "APP_ID",
"amount_available": 0,
"amount_off": null,
"created": 1525916202,
"expiration": {
"time_start": null,
"time_end": null,
"duration": null
},
"livemode": true,
"max_circulation": null,
"max_user_circulation": 100,
"metadata": {
"custom_key": "custom_value"
},
"name": "9 折券 - 最高减 10 元",
"percent_off": 10,
"times_circulated": 1,
"times_redeemed": 0,
"type": 2,
"refundable": true
},
"created": 1526283205,
"livemode": true,
"metadata": {},
"order": null,
"redeemed": false,
"time_end": null,
"time_start": null,
"user": "USER_ID",
"valid": false,
"user_times_circulated": 1
},
{……}
]
}